home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
-
- // ========== pEditCompSetAttrCB ==========
- //
- // Description:
- // User has selected the "Set Attribute" in the Edit Component
- // dialog; so set the selected attribute with the correct values.
- //
- global proc pEditCompSetAttrCB(string $nodeName,
- string $attrName, string $attrType)
- {
- // global string $dynParticleSaveParent;
- // setParent $dynParticleSaveParent;
-
- string $cmd;
-
- if (size($attrName) == 0)
- {
- warning "No valid attribute is selected.";
- return;
- }
- int $relative = `checkBoxGrp -q -v1 particleRelativeCB`;
- int $editType = `radioButtonGrp -q -sl pEditCompRB`;
-
- if ($attrType == "Float")
- {
- float $offset = `floatSliderGrp -q -v particleRandomOffset`;
- float $value = `floatSliderGrp -q -v particleComponentVal`;
-
- if ($editType == 1)
- {
- $cmd = "setParticleAttr -at "+$attrName+" -fv "+ $value +" -rf "+$offset + " -r " +$relative;
-
- evalEcho $cmd;
- }
- else
- {
- $cmd = "setParticleAttr -at "+$attrName+" -fv "+ $value +" -rf "+$offset + " -r " +$relative +" -o "+$nodeName;
-
- evalEcho $cmd;
- }
-
- }
- else
- {
- float $offsetX = `floatSliderGrp -q -v particleRandomOffsetX`;
- float $offsetY = `floatSliderGrp -q -v particleRandomOffsetY`;
- float $offsetZ = `floatSliderGrp -q -v particleRandomOffsetZ`;
- float $valueX = `floatSliderGrp -q -v particleComponentValX`;
- float $valueY = `floatSliderGrp -q -v particleComponentValY`;
- float $valueZ = `floatSliderGrp -q -v particleComponentValZ`;
-
-
- if ($editType == 1)
- {
- $cmd = "setParticleAttr -at "+$attrName+" -vv "+$valueX+" "+$valueY+" "+$valueZ+" -rv "+$offsetX+" "+$offsetY+" "+$offsetZ+" -r " +$relative;
-
- evalEcho $cmd;
- }
- else
- {
- $cmd = "setParticleAttr -at "+$attrName+" -vv "+$valueX+" "+$valueY+" "+$valueZ+" -rv "+$offsetX+" "+$offsetY+" "+$offsetZ+" -r " +$relative+" -o "+$nodeName;
- evalEcho $cmd;
- }
- }
-
- pEditCompSetAverage($nodeName, $attrName, $attrType, $editType);
-
- int $saveState = `checkBoxGrp -q -v2 particleRelativeCB`;;
-
- if ($saveState)
- {
- evalEcho("saveInitialState -attribute " + $attrName + " " +$nodeName);
- }
-
- } // pEditCompSetAttrCB
-
-
-
- global proc pEditCompSetAverage(string $nodeName,
- string $attrName,
- string $attrType,
- int $editType)
- {
- if (!`attributeQuery -exists -node $nodeName $attrName`)
- {
- warning ("Attribute \"" + $attrName
- + "\" does not exist on node \""
- + $nodeName + "\"" );
- textFieldGrp -e -en 1 pEditCompAttrTF;
- checkBoxGrp -e -en 0 particleRelativeCB;
- radioButtonGrp -e -en 0 pEditCompRB;
- tabLayout -e -en 0 pEditCompValsTL;
-
- rowLayout -e -en 0 particleEditCompAverageValue;
- rowLayout -e -en 0 particleEditCompMaxAverageOffset;
-
- return;
- } else {
- float $average[6];
-
- if ($editType == 2)
- $average = `getParticleAttr -at $attrName -o $nodeName`;
- else
- $average = `getParticleAttr -at $attrName`;
-
- if ($attrType == "Float")
- {
- floatField -e -v $average[0] particleEditCompAverageValueX;
- floatField -e
- -vis 0 particleEditCompAverageValueY;
- floatField -e
- -vis 0 particleEditCompAverageValueZ;
- floatField -e -v $average[1] particleEditCompMaxAverageOffsetX;
- floatField -e
- -vis 0 particleEditCompMaxAverageOffsetY;
- floatField -e
- -vis 0 particleEditCompMaxAverageOffsetZ;
- }
- else
- {
- floatField -e -v $average[0] particleEditCompAverageValueX;
- floatField -e
- -vis 1 -v $average[1] particleEditCompAverageValueY;
- floatField -e
- -vis 1 -v $average[2] particleEditCompAverageValueZ;
-
- floatField -e -v $average[3] particleEditCompMaxAverageOffsetX;
- floatField -e
- -vis 1 -v $average[4] particleEditCompMaxAverageOffsetY;
- floatField -e
- -vis 1 -v $average[5] particleEditCompMaxAverageOffsetZ;
- }
- }
- } // pEditCompSetAverage
-
-
-
- // ****************************************************************
- //
- // COMPONENT EDITOR PROCEDURES
- //
- // ****************************************************************
-
- global proc pEditCompSetSliderLabels(string $attrName)
- {
- if ($attrName != "rgbPP")
- {
- floatSliderGrp -e -l "X" particleComponentValX;
- floatSliderGrp -e -l "Y" particleComponentValY;
- floatSliderGrp -e -l "Z" particleComponentValZ;
- floatSliderGrp -e -l "X" particleRandomOffsetX;
- floatSliderGrp -e -l "Y" particleRandomOffsetY;
- floatSliderGrp -e -l "Z" particleRandomOffsetZ;
- }
- else
- {
- floatSliderGrp -e -l "R" particleComponentValX;
- floatSliderGrp -e -l "G" particleComponentValY;
- floatSliderGrp -e -l "B" particleComponentValZ;
- floatSliderGrp -e -l "R" particleRandomOffsetX;
- floatSliderGrp -e -l "G" particleRandomOffsetY;
- floatSliderGrp -e -l "B" particleRandomOffsetZ;
- }
- }
-
-
-
- // ========== pEditCompGetAttrCB ==========
- //
- // Description:
- // User has selected the "Get Attribute" in the Edit Component
- // dialog; so get the values of the selected attribute.
- //
- global proc pEditCompGetAttrCB(string $nodeName,
- string $attrName,
- string $attrType)
- {
- global string $dynParticleSaveParent;
- // setParent $dynParticleSaveParent;
-
-
- int $editType = `radioButtonGrp -q -sl pEditCompRB`;
-
- pEditCompSetAverage($nodeName, $attrName, $attrType, $editType);
-
-
- } // pEditCompGetAttrCB
-
-
-
-
- // ========== pEditCompSelectTypeCB ==========
- //
- // Description:
- // User has changed the selection method (object, selected comps).
- // If editing whole object, enable the object name textfield.
- // If editing selected components, disable it.
- //
- global proc pEditCompSelectTypeCB(string $nodeName,
- string $attrName,
- string $attrType,
- int $editType)
- {
- global string $dynParticleSaveParent;
- // setParent $dynParticleSaveParent;
-
- textFieldGrp -e -text $nodeName pEditCompObjTF;
- if ($editType == 2)
- {
- textFieldGrp -e -enable true pEditCompObjTF;
- }
- else
- {
- textFieldGrp -e -enable false pEditCompObjTF;
- }
-
- pEditCompSetAverage($nodeName, $attrName, $attrType, $editType);
-
- } // pEditCompSelectTypeCB
-
-
-
-
-
- // ========== pEditCompAttrNameCB ==========
- //
- // Description:
- // User has changed the attribute name.
- // Get the values for the new attribute, and reset appropriate
- // callbacks.
- //
- global proc pEditCompAttrNameCB( string $attrName )
- {
- global string $dynParticleSaveParent;
- // setParent $dynParticleSaveParent;
-
- // string $attrName = `textFieldGrp -q -text pEditCompAttrTF`;
- string $nodeName = `textFieldGrp -q -text pEditCompObjTF`;
-
- // If the attribute doesn't exist, warn the user and return.
- // I can only do this if there is an object name.
- //
- if (size($nodeName) > 0)
- {
- if (!`attributeQuery -exists -node $nodeName $attrName`)
- {
- warning ("Attribute \"" + $attrName
- + "\" does not exist on node \""
- + $nodeName + "\"" );
-
- checkBoxGrp -e -en 0 particleRelativeCB;
- radioButtonGrp -e -en 0 pEditCompRB;
- tabLayout -e -en 0 pEditCompValsTL;
-
-
- rowLayout -e -en 0 particleEditCompAverageValue;
- rowLayout -e -en 0 particleEditCompMaxAverageOffset;
-
- return;
- } else {
-
- checkBoxGrp -e -en 1 particleRelativeCB;
- radioButtonGrp -e -en 1 pEditCompRB;
- tabLayout -e -en 1 pEditCompValsTL;
-
-
- rowLayout -e -en 1 particleEditCompAverageValue;
- rowLayout -e -en 1 particleEditCompMaxAverageOffset;
- }
- }
-
- // Have to figure out what type it is; first check the list
- // of static array attributes. If it's not in there, then get
- // the list of dynamic attributes from the particle command,
- // and check it out.
- // Also, it has to be a float or vector array type.
- //
- string $attrType;
-
- if ($attrName == "position" ||
- $attrName == "velocity" ||
- $attrName == "acceleration")
- {
- $attrType = "Vector";
- tabLayout -e
- -selectTab pEditCompVecValsCL
- pEditCompValsTL;
- radioButtonGrp -e
- -cc2 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Vector 2")
- -cc1 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Vector 1")
- pEditCompRB;
- }
- else if ($attrName == "mass")
- {
- $attrType = "Float";
- tabLayout -e
- -selectTab pEditCompFloatValsCL
- pEditCompValsTL;
- radioButtonGrp -e
- -cc2 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Float 2")
- -cc1 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Float 1")
- pEditCompRB;
- }
- else
- {
- string $dynamicAttrList[] = `particle -q -dal $nodeName`;
- int $numDynAttrs = size($dynamicAttrList);
- if ($numDynAttrs > 0)
- {
- int $i;
- string $dynTokenAry[];
- for ($i = 0; $i < $numDynAttrs; $i++)
- {
- tokenize( $dynamicAttrList[$i], ":", $dynTokenAry );
-
- if ($dynTokenAry[0] == $attrName)
- {
- if ($dynTokenAry[1] == "vectorArray")
- {
- $attrType = "Vector";
- tabLayout -e
- -selectTab pEditCompVecValsCL
- pEditCompValsTL;
- radioButtonGrp -e
- -cc2 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Vector 2")
- -cc1 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Vector 1")
- pEditCompRB;
- break;
- }
- else if ($dynTokenAry[1] == "doubleArray")
- {
- $attrType = "Float";
- tabLayout -e
- -selectTab pEditCompFloatValsCL
- pEditCompValsTL;
- radioButtonGrp -e
- -cc2 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Float 2")
- -cc1 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Float 1")
- pEditCompRB;
- break;
- }
- else
- {
- warning "Attribute must be a float or vector per particle array.";
- return;
- }
- }
- }
- clear ($dynTokenAry);
- }
- clear ($dynamicAttrList);
- }
-
- // If the new attr is rgbPP, have to set XYX slider labels to RGB,
- // otherwise set the labels to XYZ.
- //
- if ($attrType == "Vector")
- pEditCompSetSliderLabels($attrName);
-
- button -e
- -c ("pEditCompSetAttrCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType)
- pEditCompSetAttrBtn;
-
- button -e
- -c ("pEditCompGetAttrCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType)
- pEditCompGetAttrBtn;
-
-
- if (size($nodeName) == 0)
- $nodeName = " ";
- pEditCompGetAttrCB($nodeName, $attrName, $attrType);
-
- } // pEditCompAttrNameCB
-
-
-
-
- // ========== pEditCompObjNameCB ==========
- //
- // Description:
- // User has changed the object name.
- // Get the values for the new object, and reset appropriate
- // callbacks.
- //
- global proc pEditCompObjNameCB( string $nodeName )
- {
- global string $dynParticleSaveParent;
- // setParent $dynParticleSaveParent;
-
- // MAKE SURE THE OBJ NAME IS CORRECT ????
- //
- string $attrName = `textFieldGrp -q -text pEditCompAttrTF`;
- // string $nodeName = `textFieldGrp -q -text pEditCompObjTF`;
-
- if (`objExists $nodeName`)
- {
- // enable all the devices in case a wrong nodeName was entered
- textFieldGrp -e -en 1 pEditCompAttrTF;
- checkBoxGrp -e -en 1 particleRelativeCB;
- radioButtonGrp -e -en 1 pEditCompRB;
- tabLayout -e -en 1 pEditCompValsTL;
-
-
- rowLayout -e -en 1 particleEditCompAverageValue;
- rowLayout -e -en 1 particleEditCompMaxAverageOffset;
-
- // check for which tab is selected
- int $whichTab = `tabLayout -q -selectTabIndex pEditCompValsTL`;
-
- if ($whichTab == 1)
- $attrType = "Float";
- else
- $attrType = "Vector";
-
- button -e
- -c ("pEditCompSetAttrCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType)
- pEditCompSetAttrBtn;
-
- button -e
- -c ("pEditCompGetAttrCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType)
- pEditCompGetAttrBtn;
-
- pEditCompGetAttrCB($nodeName, $attrName, $attrType);
- } else {
- // disable all the widgets because an invalid node was
- // entered
- textFieldGrp -e -en 0 pEditCompAttrTF;
- checkBoxGrp -e -en 0 particleRelativeCB;
- radioButtonGrp -e -en 0 pEditCompRB;
- tabLayout -e -en 0 pEditCompValsTL;
-
-
- rowLayout -e -en 0 particleEditCompAverageValue;
- rowLayout -e -en 0 particleEditCompMaxAverageOffset;
-
- warning ("The node \"" + $nodeName + "\" does not exist");
- return;
- }
-
-
- } // pEditCompObjNameCB
-
-
-
-
- // ========== AEparticleEditComponent ==========
- //
- // Description:
- // Bring up the Edit Component dialog.
- //
- global proc AEparticleEditComponent ( string $nodeName,
- string $attrName,
- string $attrType)
- {
- setUITemplate -pst attributeEditorTemplate;
-
- global float $dynMaxFloatField;
- global float $dynMinFloatField;
-
- string $buffer[];
- tokenize($nodeName, "|", $buffer);
-
- $nodeName = $buffer[size($buffer) - 1];
-
- if (!`window -exists "pEditCompWin"`)
- {
- window
- -t "Particle Components"
- -rtf false
- -wh 460 460
- pEditCompWin;
-
- setUITemplate -pst attributeEditorTemplate;
-
- // setup the main look of the window
-
- formLayout -nd 100 pEditCompBtnsF;
-
- columnLayout -adj false pEditCompCL;
- setParent ..;
-
- setUITemplate -pst attributeEditorPresetsTemplate;
-
- rowLayout -nc 4
- -cat 1 right 5
- -cat 2 both 0
- -cat 3 both 0
- -cat 4 both 0
- particleEditCompAverageValue;
- text -l "Average Value" ;
- floatField -ed 0 particleEditCompAverageValueX;
- floatField -ed 0 particleEditCompAverageValueY;
- floatField -ed 0 particleEditCompAverageValueZ;
- setParent ..;
-
- rowLayout -nc 4
- -cat 1 right 5
- -cat 2 both 0
- -cat 3 both 0
- -cat 4 both 0
- particleEditCompMaxAverageOffset;
- text -l "Max Offset from Average";
- floatField -ed 0 particleEditCompMaxAverageOffsetX;
- floatField -ed 0 particleEditCompMaxAverageOffsetY;
- floatField -ed 0 particleEditCompMaxAverageOffsetZ;
- setParent ..;
-
- setUITemplate -ppt;
-
- button -l "Set Attribute"
- -c ("pEditCompSetAttrCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType)
- pEditCompSetAttrBtn;
-
- button -l "Get Attribute"
- -c ("pEditCompGetAttrCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType)
- pEditCompGetAttrBtn;
- button -l "Close"
- -c ("window -e -vis 0 pEditCompWin")
- pEditCompWinCloseButton;
-
- separator -hr true -h 20 particleEditWndSeparator;
-
- tabLayout -tabsVisible false
- -cr true
- -scrollable true
- -hst 0 -vst 0
- pEditCompValsTL;
- setParent ..;
- setParent ..;
-
- formLayout -e
- -af pEditCompCL top 4
- -af pEditCompCL right 0
- -af pEditCompCL left 0
- -an pEditCompCL bottom
-
- -ac pEditCompValsTL top 0 pEditCompCL
- -af pEditCompValsTL left 0
- -af pEditCompValsTL right 0
- -ac pEditCompValsTL bottom 0 particleEditCompAverageValue
-
- -af particleEditCompAverageValue left 0
- -af particleEditCompAverageValue right 0
- -an particleEditCompAverageValue top
- -ac particleEditCompAverageValue bottom 0 particleEditCompMaxAverageOffset
-
- -af particleEditCompMaxAverageOffset left 0
- -af particleEditCompMaxAverageOffset right 0
- -an particleEditCompMaxAverageOffset top
- -ac particleEditCompMaxAverageOffset bottom 0 particleEditWndSeparator
-
- -an particleEditWndSeparator top
- -af particleEditWndSeparator left 0
- -af particleEditWndSeparator right 0
- -af particleEditWndSeparator bottom 30
-
- -ac pEditCompSetAttrBtn top 0 particleEditWndSeparator
- -ap pEditCompSetAttrBtn left 0 2
- -ap pEditCompSetAttrBtn right 0 32
- -af pEditCompSetAttrBtn bottom 5
-
- -ac pEditCompGetAttrBtn top 0 particleEditWndSeparator
- -ap pEditCompGetAttrBtn left 0 34
- -ap pEditCompGetAttrBtn right 0 66
- -af pEditCompGetAttrBtn bottom 5
-
- -ac pEditCompWinCloseButton top 0 particleEditWndSeparator
- -ap pEditCompWinCloseButton left 0 68
- -ap pEditCompWinCloseButton right 0 98
- -af pEditCompWinCloseButton bottom 5
-
- pEditCompBtnsF;
-
-
- // start building the widgets
- //
- setParent pEditCompCL;
- textFieldGrp -l "Object Name"
- -text $nodeName
- -cc ("pEditCompObjNameCB #1")
- pEditCompObjTF;
-
- textFieldGrp -l "Attribute Name"
- -text $attrName
- -cc ("pEditCompAttrNameCB #1")
- pEditCompAttrTF;
-
- radioButtonGrp
- -l "Edit"
- -l2 "Entire Object"
- -l1 "Selected Components"
- -cc2 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType+" 2")
- -cc1 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType+" 1")
- -nrb 2
- pEditCompRB;
- radioButtonGrp -e -select 1 pEditCompRB;
-
- checkBoxGrp -ncb 2
- -l " "
- -l1 "Relative"
- -l2 "Save Initial State"
- -v2 1
- particleRelativeCB;
-
- // create the widgets for the tabLayout
- setParent pEditCompValsTL;
- columnLayout pEditCompFloatValsCL;
-
- frameLayout -bv 0 -cll false -lv false ;
- columnLayout;
- floatSliderGrp -l "Attribute Value"
- -field true
- -min -10 -max 10
- -fmn $dynMinFloatField
- -fmx $dynMaxFloatField
- -pre 3 -step 0.1
- particleComponentVal;
-
- floatSliderGrp -l "Random Offset"
- -field true
- -min 0 -max 10
- -fmn 0 -fmx $dynMaxFloatField
- -pre 3 -step 0.1
- particleRandomOffset;
- setParent ..;
- setParent ..;
- setParent ..; // columnLayout
-
- columnLayout pEditCompVecValsCL;
-
- frameLayout -bv 0
- -cll false
- -l "Attribute Value";
- columnLayout;
- floatSliderGrp -l "X"
- -field true
- -min -10 -max 10
- -fmn $dynMinFloatField
- -fmx $dynMaxFloatField
- -pre 3 -step 0.1
- particleComponentValX;
- floatSliderGrp -l "Y"
- -field true
- -min -10 -max 10
- -fmn $dynMinFloatField
- -fmx $dynMaxFloatField
- -pre 3 -step 0.1
- particleComponentValY;
- floatSliderGrp -l "Z"
- -field true
- -min -10 -max 10
- -fmn $dynMinFloatField
- -fmx $dynMaxFloatField
- -pre 3 -step 0.1
- particleComponentValZ;
- setParent ..;
- setParent ..;
- separator;
- frameLayout
- -bv 0
- -cll false
- -l "Random Offset";
- columnLayout;
- floatSliderGrp -l "X"
- -field true
- -min 0 -max 10
- -fmn 0 -fmx $dynMaxFloatField
- -pre 3 -step 0.1
- particleRandomOffsetX;
- floatSliderGrp -l "Y"
- -field true
- -min 0 -max 10
- -fmn 0 -fmx $dynMaxFloatField
- -pre 3 -step 0.1
- particleRandomOffsetY;
- floatSliderGrp -l "Z"
- -field true
- -min 0 -max 10
- -fmn 0 -fmx $dynMaxFloatField
- -pre 3 -step 0.1
- particleRandomOffsetZ;
- setParent ..;
- setParent ..;
-
- setParent ..; // columnLayout
- setParent ..; // tabLayout
-
-
- setUITemplate -ppt;
-
- }
- else
- {
-
- textFieldGrp -e
- -text $nodeName
- pEditCompObjTF;
-
- textFieldGrp -e
- -text $attrName
- pEditCompAttrTF;
-
- button -e
- -c ("pEditCompSetAttrCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType)
- pEditCompSetAttrBtn;
-
- button -e
- -c ("pEditCompGetAttrCB "
- +$nodeName+" "
- +$attrName+" "
- +$attrType)
- pEditCompGetAttrBtn;
-
- // make sure everything is enabled when a new attribute
- // is selected from the attribute editor
- textFieldGrp -e -en 1 pEditCompObjTF;
- textFieldGrp -e -en 1 pEditCompAttrTF;
- checkBoxGrp -e -en 1 particleRelativeCB;
- radioButtonGrp -e -en 1 pEditCompRB;
- tabLayout -e -en 1 pEditCompValsTL;
-
- rowLayout -e -en 1 particleEditCompAverageValue;
- rowLayout -e -en 1 particleEditCompMaxAverageOffset;
-
- int $RBselected = `radioButtonGrp -q -sl pEditCompRB`;
- pEditCompSelectTypeCB $nodeName $attrName $attrType $RBselected;
-
- }
-
- if ($attrType == "Float")
- {
- floatSliderGrp -e -v 0.0 particleComponentVal;
- floatSliderGrp -e -v 0.0 particleRandomOffset;
- tabLayout -e
- -selectTab pEditCompFloatValsCL
- pEditCompValsTL;
- radioButtonGrp -e
- -cc2 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Float 2")
- -cc1 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Float 1")
- pEditCompRB;
- }
- else
- {
- floatSliderGrp -e -v 0.0 particleComponentValX;
- floatSliderGrp -e -v 0.0 particleComponentValY;
- floatSliderGrp -e -v 0.0 particleComponentValZ;
- floatSliderGrp -e -v 0.0 particleRandomOffsetX;
- floatSliderGrp -e -v 0.0 particleRandomOffsetY;
- floatSliderGrp -e -v 0.0 particleRandomOffsetZ;
-
- pEditCompSetSliderLabels($attrName);
-
- tabLayout -e
- -selectTab pEditCompVecValsCL
- pEditCompValsTL;
- radioButtonGrp -e
- -cc2 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Vector 2")
- -cc1 ("pEditCompSelectTypeCB "
- +$nodeName+" "
- +$attrName+" "
- +" Vector 1")
- pEditCompRB;
- }
-
- pEditCompGetAttrCB($nodeName, $attrName, $attrType);
- int $RBselected = `radioButtonGrp -q -sl pEditCompRB`;
- pEditCompSelectTypeCB $nodeName $attrName $attrType $RBselected;
-
- setUITemplate -ppt;
-
- showWindow pEditCompWin;
-
- } // AEparticleEditComponent
-